


;=======================
;=                     =
;= DOUBLE DRAGON REDUX =
;=                     =
;=======================







	.ORG 25600
	
	;DDR never touch memory between 23296 and top of stack
	;so generaly it is safe to store disk routines there
	;
	;when game wants to load a block from tape/disk
	;it just calls 
	;  load_block  with IX, DE, A
	;  load_screen loads screen

load_data
	jp sexy_tape
load_screen
	jp sexy_screen 
start
	di
	ld sp, 25599
	xor a
	out (254), a

	ld a, im_table / 256
	ld i, a
	im 2
	
	ld de, plugin_ay
	call add_plugin		;add ay plugin
	;ld a, SONG_TITLE
	;call ay_init		;play title
	im 2
	ei
	;call key_after_load
	
	;#INCLUDE "s099_menu.asm"	;menu routines

	#INCLUDE "s002_im2handler.asm"	;im 2 
  #INCLUDE "s008_char2x.asm"      ;scale 2x
  #INCLUDE "s010_datatab.asm"     ;data tables 
  



	.ORG 32768

	;the fast memory
	
	#INCLUDE "s050_tables.asm"
	#INCLUDE "s009_tile.asm"
			
 	 .ORG  41472
sprite_buf
attr_buf
   .BYTE 0

   .ORG 41728
mask_buf	
   .BYTE 0
  	
	 .ORG  41984
tile_gfx
   .BYTE 0	
	